package com.bupt.user.client;



import com.bupt.config.FeignClientsConfigurationCustom;
import com.bupt.config.FeignErrorDecoder;
import com.bupt.user.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "user-service", configuration = {FeignErrorDecoder.class, FeignClientsConfigurationCustom.class})
public interface UserClient {

    @PostMapping("/user/login")
    User login(@RequestBody User user);

    @RequestMapping("/user/getUserByUserId")
    User getUserByUserId(@RequestParam String userId);

    @RequestMapping("/user/logout")
    void logout();

    @RequestMapping("/user/getUserFromSession")
    User getUserFromSession();

}
